 

interface FileReq {
  file: any
}

interface ResourceTypeReq {
  type: 'FILE' | 'UDF'
  programType?: string
}

interface UdfTypeReq {
  type: 'HIVE' | 'SPARK'
}

interface NameReq {
  name: string
}

interface FileNameReq {
  fileName: string
}

interface FullNameReq {
  fullName: string
}

interface IdReq {
  id: number
}

interface ContentReq {
  content: string
}

interface DescriptionReq {
  description?: string
}

interface CreateReq extends ResourceTypeReq, DescriptionReq {
  currentDir: string
  pid: number
}

interface UserIdReq {
  userId: number
}

interface OnlineCreateReq extends CreateReq, ContentReq {
  suffix: string
}

interface ProgramTypeReq {
  programType: 'JAVA' | 'SCALA' | 'PYTHON' | 'SQL'
}

interface ListReq {
  pageNo: number
  pageSize: number
  searchVal?: string
}

interface ViewResourceReq {
  limit: number
  skipLineNum: number
}

interface ResourceIdReq {
  resourceId: number
}

interface UdfFuncReq extends UdfTypeReq, DescriptionReq, ResourceIdReq {
  className: string
  funcName: string
  argTypes?: string
  database?: string
}

interface ResourceFile {
  id: number
  pid: number
  alias: string
  userName: string
  userId: number
  type: string
  directory: boolean
  fileName: string
  fullName: string
  description: string
  size: number
  updateTime: string
}

interface ResourceListRes {
  currentPage: number
  pageSize: number
  start: number
  total: number
  totalList: ResourceFile[]
}

interface ResourceViewRes {
  alias: string
  content: string
}

export {
  FileReq,
  ResourceTypeReq,
  UdfTypeReq,
  NameReq,
  FileNameReq,
  FullNameReq,
  IdReq,
  ContentReq,
  DescriptionReq,
  CreateReq,
  UserIdReq,
  OnlineCreateReq,
  ProgramTypeReq,
  ListReq,
  ViewResourceReq,
  ResourceIdReq,
  UdfFuncReq,
  ResourceListRes,
  ResourceViewRes,
  ResourceFile
}
